<?php defined('TSTP_VERSION') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Test_Types
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: long.tstp.php 194 2009-03-07 15:43:46Z molotsoft@gmail.com $
* @link $HeadURL: http://test-types.googlecode.com/svn/tags/1.0.4/types/long.tstp.php $
*/


function tstp_long($var) {
	return is_long($var);
}

function tstp_l($var) { return tstp_long($var); }


function tstp_unsigned_long($var) {
	return is_long($var) && ($var >= 0);
}

function tstp_ulong($var) { return tstp_unsigned_long($var); }
function tstp_ul($var) { return tstp_unsigned_long($var); }


define('TSTP_ZERO_LONG', 0);

function tstp_zero_long($var) {
	return is_long($var) && ($var === TSTP_ZERO_LONG);
}

define('TSTP_ZLONG', TSTP_ZERO_LONG);
define('TSTP_ZL', TSTP_ZERO_LONG);

function tstp_zlong($var) { return tstp_zero_long($var); }
function tstp_zl($var) { return tstp_zero_long($var); }


function tstp_range_long($var, $minval = NULL, $maxval = NULL) {
	return is_long($var) && in_range($minval, $var, $maxval);
}

function tstp_rlong($var, $minval = NULL, $maxval = NULL) { return tstp_range_long($var, $minval, $maxval); }
function tstp_rl($var, $minval = NULL, $maxval = NULL) { return tstp_range_long($var, $minval, $maxval); }


?>